package com.csdj.s3project.mapper;

import com.csdj.s3project.entity.Winner;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zq
 * @since 2022-01-18
 */
public interface WinnerMapper extends BaseMapper<Winner> {
    @Select("SELECT w.id,w.account,`award_name`,`award_count`,`win_time`,u.head_url FROM `winner` AS w INNER join `user` as u ON w.account = u.account where win_time GROUP BY win_time asc LIMIT 0,3")
    List<Winner> selectWinners();
}
